<link rel="import" href="../../../../packages/polymer/polymer.html">
<link rel="import" href="curly_block.html">
<link rel="import" href="field_ref.html">
<link rel="import" href="observatory_element.html">
<link rel="import" href="service_ref.html">

<polymer-element name="inbound-reference" extends="service-ref">
  <template>
    <link rel="stylesheet" href="css/shared.css">
    <div>
      from <any-service-ref ref="{{ source }}"></any-service-ref>
      <template if="{{ slotIsArrayIndex }}">via [{{ slot }}]</template>
      <template if="{{ slotIsField }}">via <field-ref ref="{{ slot }}"></field-ref></template>

      <curly-block callback="{{ expander() }}">
        <div class="memberList">
          <div class="memberItem">
            <div class="memberName">
              <template repeat="{{ reference in inboundReferences] }}">
                <inbound-reference ref="{{ reference }}"></inbound-reference>
              </template>
            </div>
          </div>
        </div>
      </curly-block>
    </div>
  </template>
</polymer-element>

<script type="application/dart" src="inbound_reference.dart"></script>
